{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Users/gwf25/Desktop/claims_VI.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res} 7 Dec 2015, 10:00:29

{com}. do "/Users/gwf25/Dropbox/research/religion/final code/claims_VI.do"
{txt}
{com}. ************************************************************************************
. ************************************************************************************
. **********Claims in VI. Main Experiment Results: Protestants and Catholics*********
. ************************************************************************************
. ************************************************************************************
. 
. *Public goods game 
. 
. *simulations
. *Protestant Contribution 
. set seed 1
{txt}
{com}. clear all
{txt}
{com}. set more off
{txt}
{com}. save results1a, replace emptyok
{txt}(note: dataset contains 0 observations)
(note: file results1a.dta not found)
file results1a.dta saved

{com}. forvalues i = 1/1000 {c -(}
{txt}  2{com}. 
. quietly{c -(}
{txt}  3{com}. 
. clear all
{txt}  4{com}. set mem 50m
{txt}  5{com}. 
. use "/Users/gwf25/Dropbox/research/religion/final code/religion_all.dta"
{txt}  6{com}. 
. //  Begin definition of variables
. 
. ***Drop subjects who thought the experiment was about religion
. gen id = _n
{txt}  7{com}. drop if id == 98 | id == 176 | id == 194 | id == 383
{txt}  8{com}. 
. ***Drop subjects who incorrectly completed the priming task. This includes subjects who leave more than half the responses blank. The following subjects
. ***all left at least questions #2-#7 blank in the sentence unscrambling task. 
. drop if id==7 | id==719 | id==740 | id==762 | id==940
{txt}  9{com}. 
. ***An error led to some subjects seeing both the control and religion salient sentence unscrambling tasks. Here, we drop those subjects.
. drop if prime_diff == 1
{txt} 10{com}. 
. ***"skipped" is a dummy variable for whether subjects skip the question that asks their religion. If they skip this question, we drop them from the sample 
. ***and if not, we assign a dummy variable to indicate the treatment group (religion salient or control) that subject belongs to.
. gen skipped=0
{txt} 11{com}. replace skipped=1 if  s10q15==""
{txt} 12{com}. gen treatR=.
{txt} 13{com}. replace treatR=religion if skipped==0
{txt} 14{com}. drop if skipped==1
{txt} 15{com}. 
. ***Define religion
. gen relig=.
{txt} 16{com}. 
. ***Note: 1 = protestant or other christian, 2 = catholic, 3 = jewish, 4 = agnostic/atheist
. replace relig=1 if (s10q15=="Christian - Other (please specify below)" | s10q15=="Christian - Protestant (please specify denomination below)")
{txt} 17{com}. replace relig=2 if s10q15=="Christian - Catholic"
{txt} 18{com}. replace relig=3 if s10q15=="Jewish (Orthodox/Reformed/etc.)" | s10q15=="Jewish (Orthodox/Reform/etc.)"
{txt} 19{com}. replace relig=4 if (s10q15=="Agnostic" | s10q15=="Atheist")
{txt} 20{com}. 
. ***Drop Mormon/Othodox Christians from the sample
. drop if s10q15sp == "Greek Orthodox"
{txt} 21{com}. drop if s10q15sp == "Russian Othrodox"
{txt} 22{com}. drop if s10q15sp == "greek orthodox"
{txt} 23{com}. drop if s10q15sp == "Orthodox Christian"
{txt} 24{com}. drop if s10q15sp == "Greek Orthdox"
{txt} 25{com}. drop if s10q15sp == "christian orthodox"
{txt} 26{com}. drop if s10q15sp == "Greek Orthodox Christian"
{txt} 27{com}. drop if s10q15sp == "Russian orthodox"
{txt} 28{com}. drop if s10q15sp == "Church of Jesus Christ of Latter Day Saints"
{txt} 29{com}. drop if s10q15sp == "Greek Orthodox"
{txt} 30{com}. 
. // End of variables
. 
. ***Panel A
. 
. 
. 
. 
. 
. rename s6 contribute
{txt} 31{com}. rename s6exp expect
{txt} 32{com}. 
. reg contribute treatR if relig == 1, r
{txt} 33{com}. 
. keep if relig == 1 & contribute ~= .
{txt} 34{com}. replace id = _n
{txt} 35{com}. 
. 
. preserve
{txt} 36{com}. 
. gen idR = .
{txt} 37{com}. keep if treatR == 1
{txt} 38{com}. replace idR = _n
{txt} 39{com}. save rev1aR, replace
{txt} 40{com}. 
. drop _all
{txt} 41{com}. set obs 86 //draw 86
{txt} 42{com}. generate obsnoR = floor(87*runiform() + 1) //from 87
{txt} 43{com}. 
. sort obsnoR
{txt} 44{com}. save obsnos_to_drawR, replace
{txt} 45{com}. 
. use rev1aR, clear
{txt} 46{com}. generate obsnoR = idR
{txt} 47{com}. merge 1:m obsnoR using obsnos_to_drawR, keep(match) nogen
{txt} 48{com}. save R, replace
{txt} 49{com}. 
. restore
{txt} 50{com}. 
. 
. 
. 
. gen idC = .
{txt} 51{com}. keep if treatR == 0
{txt} 52{com}. replace idC = _n
{txt} 53{com}. save rev1aC, replace
{txt} 54{com}. 
. drop _all
{txt} 55{com}. set obs 86 //draw 86
{txt} 56{com}. generate obsnoC = floor(84*runiform() + 1) // from 84
{txt} 57{com}. 
. sort obsnoC
{txt} 58{com}. save obsnos_to_drawC, replace
{txt} 59{com}. 
. use rev1aC, clear
{txt} 60{com}. generate obsnoC = idC
{txt} 61{com}. merge 1:m obsnoC using obsnos_to_drawC, keep(match) nogen
{txt} 62{com}. save C, replace
{txt} 63{com}. 
. clear all
{txt} 64{com}. 
. use R
{txt} 65{com}. append using C
{txt} 66{com}. 
. reg contribute treatR, r 
{txt} 67{com}. matrix V = e(V)
{txt} 68{com}. matrix b = e(b)'
{txt} 69{com}. matrix se = vecdiag(cholesky(diag(vecdiag(V))))'
{txt} 70{com}. 
. svmat b
{txt} 71{com}. svmat se
{txt} 72{com}. gen t = b1/se1
{txt} 73{com}. gen p = 2*ttail(e(df_r),abs(t))
{txt} 74{com}. 
. replace id = _n
{txt} 75{com}. drop if id > 1
{txt} 76{com}. keep p
{txt} 77{com}. 
. append using results1a
{txt} 78{com}. save results1a, replace
{txt} 79{com}. {c )-}
{txt} 80{com}. display `i'
{txt} 81{com}. {c )-}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{txt}
{com}. 
. 
. clear all
{txt}
{com}. use results1a
{txt}
{com}. count if p < .05 // result 697/1000
{res}  697
{txt}
{com}. 
. *Catholic Contribution
. set seed 1
{txt}
{com}. clear all
{txt}
{com}. set more off
{txt}
{com}. save results1a, replace emptyok
{txt}(note: dataset contains 0 observations)
file results1a.dta saved

{com}. forvalues i = 1/1000 {c -(}
{txt}  2{com}. 
. quietly{c -(}
{txt}  3{com}. 
. clear all
{txt}  4{com}. set mem 30m
{txt}  5{com}. 
. use "/Users/gwf25/Dropbox/research/religion/final code/religion_all.dta"
{txt}  6{com}. 
. //  Begin definition of variables
. 
. ***Drop subjects who thought the experiment was about religion
. gen id = _n
{txt}  7{com}. drop if id == 98 | id == 176 | id == 194 | id == 383
{txt}  8{com}. 
. ***Drop subjects who incorrectly completed the priming task. This includes subjects who leave more than half the responses blank. The following subjects
. ***all left at least questions #2-#7 blank in the sentence unscrambling task. 
. drop if id==7 | id==719 | id==740 | id==762 | id==940
{txt}  9{com}. 
. ***An error led to some subjects seeing both the control and religion salient sentence unscrambling tasks. Here, we drop those subjects.
. drop if prime_diff == 1
{txt} 10{com}. 
. ***"skipped" is a dummy variable for whether subjects skip the question that asks their religion. If they skip this question, we drop them from the sample 
. ***and if not, we assign a dummy variable to indicate the treatment group (religion salient or control) that subject belongs to.
. gen skipped=0
{txt} 11{com}. replace skipped=1 if  s10q15==""
{txt} 12{com}. gen treatR=.
{txt} 13{com}. replace treatR=religion if skipped==0
{txt} 14{com}. drop if skipped==1
{txt} 15{com}. 
. ***Define religion
. gen relig=.
{txt} 16{com}. 
. ***Note: 1 = protestant or other christian, 2 = catholic, 3 = jewish, 4 = agnostic/atheist
. replace relig=1 if (s10q15=="Christian - Other (please specify below)" | s10q15=="Christian - Protestant (please specify denomination below)")
{txt} 17{com}. replace relig=2 if s10q15=="Christian - Catholic"
{txt} 18{com}. replace relig=3 if s10q15=="Jewish (Orthodox/Reformed/etc.)" | s10q15=="Jewish (Orthodox/Reform/etc.)"
{txt} 19{com}. replace relig=4 if (s10q15=="Agnostic" | s10q15=="Atheist")
{txt} 20{com}. 
. ***Drop orthodox/mormon from christian-other category
. *drop if s10q15sp == "Greek Orthodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Greek Orthdox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Russian Othrodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "greek orthodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Orthodox Christian" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "christian orthodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Greek Orthodox Christian" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Russian orthodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Church of Jesus Christ of Latter Day Saints" & s10q15=="Christian - Other (please specify below)"
. 
. // End of variables
. 
. ***Panel A
. 
. 
. 
. 
. 
. rename s6 contribute
{txt} 21{com}. rename s6exp expect
{txt} 22{com}. 
. reg contribute treatR if relig == 2, r
{txt} 23{com}. 
. keep if relig == 2 & contribute ~= .
{txt} 24{com}. replace id = _n
{txt} 25{com}. 
. 
. preserve
{txt} 26{com}. 
. gen idR = .
{txt} 27{com}. keep if treatR == 1
{txt} 28{com}. replace idR = _n
{txt} 29{com}. save rev1aR, replace
{txt} 30{com}. 
. drop _all
{txt} 31{com}. set obs 69 //draw 69
{txt} 32{com}. generate obsnoR = floor(75*runiform() + 1) //from 91
{txt} 33{com}. 
. sort obsnoR
{txt} 34{com}. save obsnos_to_drawR, replace
{txt} 35{com}. 
. use rev1aR, clear
{txt} 36{com}. generate obsnoR = idR
{txt} 37{com}. merge 1:m obsnoR using obsnos_to_drawR, keep(match) nogen
{txt} 38{com}. save R, replace
{txt} 39{com}. 
. restore
{txt} 40{com}. 
. 
. 
. 
. gen idC = .
{txt} 41{com}. keep if treatR == 0
{txt} 42{com}. replace idC = _n
{txt} 43{com}. save rev1aC, replace
{txt} 44{com}. 
. drop _all
{txt} 45{com}. set obs 69 //draw 69
{txt} 46{com}. generate obsnoC = floor(63*runiform() + 1) // from 89
{txt} 47{com}. 
. sort obsnoC
{txt} 48{com}. save obsnos_to_drawC, replace
{txt} 49{com}. 
. use rev1aC, clear
{txt} 50{com}. generate obsnoC = idC
{txt} 51{com}. merge 1:m obsnoC using obsnos_to_drawC, keep(match) nogen
{txt} 52{com}. save C, replace
{txt} 53{com}. 
. clear all
{txt} 54{com}. 
. use R
{txt} 55{com}. append using C
{txt} 56{com}. 
. reg contribute treatR, r 
{txt} 57{com}. matrix V = e(V)
{txt} 58{com}. matrix b = e(b)'
{txt} 59{com}. matrix se = vecdiag(cholesky(diag(vecdiag(V))))'
{txt} 60{com}. 
. svmat b
{txt} 61{com}. svmat se
{txt} 62{com}. gen t = b1/se1
{txt} 63{com}. gen p = 2*ttail(e(df_r),abs(t))
{txt} 64{com}. 
. replace id = _n
{txt} 65{com}. drop if id > 1
{txt} 66{com}. keep p
{txt} 67{com}. 
. append using results1a
{txt} 68{com}. save results1a, replace
{txt} 69{com}. {c )-}
{txt} 70{com}. display `i'
{txt} 71{com}. {c )-}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{txt}
{com}. 
. 
. clear all
{txt}
{com}. use results1a
{txt}
{com}. count if p < .05 // result 749/1000
{res}  749
{txt}
{com}. 
. *Catholic Expectation
. set seed 1
{txt}
{com}. clear all
{txt}
{com}. set more off
{txt}
{com}. save results1a, replace emptyok
{txt}(note: dataset contains 0 observations)
file results1a.dta saved

{com}. forvalues i = 1/1000 {c -(}
{txt}  2{com}. 
. quietly{c -(}
{txt}  3{com}. 
. clear all
{txt}  4{com}. set mem 30m
{txt}  5{com}. 
. use "/Users/gwf25/Dropbox/research/religion/final code/religion_all.dta"
{txt}  6{com}. 
. //  Begin definition of variables
. 
. ***Drop subjects who thought the experiment was about religion
. gen id = _n
{txt}  7{com}. drop if id == 98 | id == 176 | id == 194 | id == 383
{txt}  8{com}. 
. ***Drop subjects who incorrectly completed the priming task. This includes subjects who leave more than half the responses blank. The following subjects
. ***all left at least questions #2-#7 blank in the sentence unscrambling task. 
. drop if id==7 | id==719 | id==740 | id==762 | id==940
{txt}  9{com}. 
. ***An error led to some subjects seeing both the control and religion salient sentence unscrambling tasks. Here, we drop those subjects.
. drop if prime_diff == 1
{txt} 10{com}. 
. ***"skipped" is a dummy variable for whether subjects skip the question that asks their religion. If they skip this question, we drop them from the sample 
. ***and if not, we assign a dummy variable to indicate the treatment group (religion salient or control) that subject belongs to.
. gen skipped=0
{txt} 11{com}. replace skipped=1 if  s10q15==""
{txt} 12{com}. gen treatR=.
{txt} 13{com}. replace treatR=religion if skipped==0
{txt} 14{com}. drop if skipped==1
{txt} 15{com}. 
. ***Define religion
. gen relig=.
{txt} 16{com}. 
. ***Note: 1 = protestant or other christian, 2 = catholic, 3 = jewish, 4 = agnostic/atheist
. replace relig=1 if (s10q15=="Christian - Other (please specify below)" | s10q15=="Christian - Protestant (please specify denomination below)")
{txt} 17{com}. replace relig=2 if s10q15=="Christian - Catholic"
{txt} 18{com}. replace relig=3 if s10q15=="Jewish (Orthodox/Reformed/etc.)" | s10q15=="Jewish (Orthodox/Reform/etc.)"
{txt} 19{com}. replace relig=4 if (s10q15=="Agnostic" | s10q15=="Atheist")
{txt} 20{com}. 
. ***Drop orthodox/mormon from christian-other category
. *drop if s10q15sp == "Greek Orthodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Greek Orthdox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Russian Othrodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "greek orthodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Orthodox Christian" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "christian orthodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Greek Orthodox Christian" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Russian orthodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Church of Jesus Christ of Latter Day Saints" & s10q15=="Christian - Other (please specify below)"
. 
. // End of variables
. 
. ***Panel A
. 
. 
. 
. 
. 
. rename s6 contribute
{txt} 21{com}. rename s6exp expect
{txt} 22{com}. 
. reg expect treatR if relig == 2, r
{txt} 23{com}. 
. keep if relig == 2 & expect ~= .
{txt} 24{com}. replace id = _n
{txt} 25{com}. 
. 
. preserve
{txt} 26{com}. 
. gen idR = .
{txt} 27{com}. keep if treatR == 1
{txt} 28{com}. replace idR = _n
{txt} 29{com}. save rev1aR, replace
{txt} 30{com}. 
. drop _all
{txt} 31{com}. set obs 69 //draw 69
{txt} 32{com}. generate obsnoR = floor(75*runiform() + 1) //from 91
{txt} 33{com}. 
. sort obsnoR
{txt} 34{com}. save obsnos_to_drawR, replace
{txt} 35{com}. 
. use rev1aR, clear
{txt} 36{com}. generate obsnoR = idR
{txt} 37{com}. merge 1:m obsnoR using obsnos_to_drawR, keep(match) nogen
{txt} 38{com}. save R, replace
{txt} 39{com}. 
. restore
{txt} 40{com}. 
. 
. 
. 
. gen idC = .
{txt} 41{com}. keep if treatR == 0
{txt} 42{com}. replace idC = _n
{txt} 43{com}. save rev1aC, replace
{txt} 44{com}. 
. drop _all
{txt} 45{com}. set obs 69 //draw 69
{txt} 46{com}. generate obsnoC = floor(63*runiform() + 1) // from 89
{txt} 47{com}. 
. sort obsnoC
{txt} 48{com}. save obsnos_to_drawC, replace
{txt} 49{com}. 
. use rev1aC, clear
{txt} 50{com}. generate obsnoC = idC
{txt} 51{com}. merge 1:m obsnoC using obsnos_to_drawC, keep(match) nogen
{txt} 52{com}. save C, replace
{txt} 53{com}. 
. clear all
{txt} 54{com}. 
. use R
{txt} 55{com}. append using C
{txt} 56{com}. 
. reg expect treatR, r 
{txt} 57{com}. matrix V = e(V)
{txt} 58{com}. matrix b = e(b)'
{txt} 59{com}. matrix se = vecdiag(cholesky(diag(vecdiag(V))))'
{txt} 60{com}. 
. svmat b
{txt} 61{com}. svmat se
{txt} 62{com}. gen t = b1/se1
{txt} 63{com}. gen p = 2*ttail(e(df_r),abs(t))
{txt} 64{com}. 
. replace id = _n
{txt} 65{com}. drop if id > 1
{txt} 66{com}. keep p
{txt} 67{com}. 
. append using results1a
{txt} 68{com}. save results1a, replace
{txt} 69{com}. {c )-}
{txt} 70{com}. display `i'
{txt} 71{com}. {c )-}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{txt}
{com}. 
. 
. clear all
{txt}
{com}. use results1a
{txt}
{com}. count if p < .05 // result 618/1000
{res}  618
{txt}
{com}. 
. *Risk Aversion and Time Discounting consistency check
. clear all
{txt}
{com}. set mem 30m
{txt}(30720k)

{com}. 
. use "/Users/gwf25/Dropbox/research/religion/final code/religion_all.dta"
{txt}
{com}. 
. //  Begin definition of variables
. 
. ***Drop subjects who thought the experiment was about religion
. gen id = _n
{txt}
{com}. drop if id == 98 | id == 176 | id == 194 | id == 383
{txt}(4 observations deleted)

{com}. 
. ***Drop subjects who incorrectly completed the priming task. This includes subjects who leave more than half the responses blank. The following subjects
. ***all left at least questions #2-#7 blank in the sentence unscrambling task. 
. drop if id==7 | id==719 | id==740 | id==762 | id==940
{txt}(5 observations deleted)

{com}. 
. ***An error led to some subjects seeing both the control and religion salient sentence unscrambling tasks. Here, we drop those subjects.
. drop if prime_diff == 1
{txt}(2 observations deleted)

{com}. 
. ***"skipped" is a dummy variable for whether subjects skip the question that asks their religion. If they skip this question, we drop them from the sample 
. ***and if not, we assign a dummy variable to indicate the treatment group (religion salient or control) that subject belongs to.
. gen skipped=0
{txt}
{com}. replace skipped=1 if  s10q15==""
{txt}(21 real changes made)

{com}. gen treatR=.
{txt}(1033 missing values generated)

{com}. replace treatR=religion if skipped==0
{txt}(1012 real changes made)

{com}. drop if skipped==1
{txt}(21 observations deleted)

{com}. 
. ***Define religion
. gen relig=.
{txt}(1012 missing values generated)

{com}. 
. ***Note: 1 = protestant or other christian, 2 = catholic, 3 = jewish, 4 = agnostic/atheist
. replace relig=1 if (s10q15=="Christian - Other (please specify below)" | s10q15=="Christian - Protestant (please specify denomination below)")
{txt}(264 real changes made)

{com}. replace relig=2 if s10q15=="Christian - Catholic"
{txt}(199 real changes made)

{com}. replace relig=3 if s10q15=="Jewish (Orthodox/Reformed/etc.)" | s10q15=="Jewish (Orthodox/Reform/etc.)"
{txt}(95 real changes made)

{com}. replace relig=4 if (s10q15=="Agnostic" | s10q15=="Atheist")
{txt}(269 real changes made)

{com}. 
. ***Drop Mormon/Othodox Christians from the sample
. drop if s10q15sp == "Greek Orthodox"
{txt}(2 observations deleted)

{com}. drop if s10q15sp == "Russian Othrodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "greek orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Orthodox Christian"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthdox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "christian orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthodox Christian"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Russian orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Church of Jesus Christ of Latter Day Saints"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthodox"
{txt}(0 observations deleted)

{com}. 
. // End of variables
. 
. gen riskmonotonesmall = 1 if s3q1 ~= .
{txt}(596 missing values generated)

{com}. forvalues count = 1/5 {c -(}
{txt}  2{com}.         local countup = `count' + 1
{txt}  3{com}.         replace riskmonotonesmall = 0 if s3q`count' == 1 & s3q`countup' == 0
{txt}  4{com}. {c )-}
{txt}(2 real changes made)
(4 real changes made)
(1 real change made)
(4 real changes made)
(1 real change made)

{com}. gen riskmonotonelarge = 1 if s4q1 ~= .
{txt}(596 missing values generated)

{com}. forvalues count = 1/5 {c -(}
{txt}  2{com}.         local countup = `count' + 1
{txt}  3{com}.         replace riskmonotonelarge = 0 if s4q`count' == 1 & s4q`countup' == 0
{txt}  4{com}. {c )-}
{txt}(0 real changes made)
(4 real changes made)
(5 real changes made)
(1 real change made)
(3 real changes made)

{com}. gen riskconsistent = .
{txt}(1002 missing values generated)

{com}. replace riskconsistent = 1 if riskmonotonesmall == 1 & riskmonotonelarge == 1
{txt}(385 real changes made)

{com}. replace riskconsistent = 0 if riskmonotonesmall == 0 | riskmonotonelarge == 0
{txt}(21 real changes made)

{com}. su riskconsistent if relig ~= .

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
riskconsis~t {c |}{res}       331    .9516616     .214805          0          1
{txt}
{com}. 
. gen timenow = 1 if s2q1 ~= .
{txt}(596 missing values generated)

{com}. forvalues count = 1/11 {c -(}
{txt}  2{com}.         local countup = `count' + 1
{txt}  3{com}.         replace timenow = 0 if s2q`count' == 1 & s2q`countup' == 0
{txt}  4{com}. {c )-}
{txt}(0 real changes made)
(1 real change made)
(2 real changes made)
(0 real changes made)
(1 real change made)
(0 real changes made)
(0 real changes made)
(3 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)

{com}. gen timeone = 1 if s2q13 ~= .
{txt}(596 missing values generated)

{com}. forvalues count = 13/23 {c -(}
{txt}  2{com}.         local countup = `count' + 1
{txt}  3{com}.         replace timeone = 0 if s2q`count' == 1 & s2q`countup' == 0
{txt}  4{com}. {c )-}
{txt}(0 real changes made)
(0 real changes made)
(0 real changes made)
(0 real changes made)
(2 real changes made)
(1 real change made)
(0 real changes made)
(1 real change made)
(1 real change made)
(0 real changes made)
(0 real changes made)

{com}. gen timeconsistent = .
{txt}(1002 missing values generated)

{com}. replace timeconsistent = 1 if timenow == 1 & timeone == 1
{txt}(395 real changes made)

{com}. replace timeconsistent = 0 if timenow == 0 | timeone == 0
{txt}(11 real changes made)

{com}. su timeconsistent if relig ~= .

{txt}    Variable {c |}       Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 56}
timeconsis~t {c |}{res}       331    .9728097    .1628839          0          1
{txt}
{com}. 
. *Catholic risk regression controlling for gender dummy
. clear all
{txt}
{com}. set mem 30m
{txt}(30720k)

{com}. set more off
{txt}
{com}. 
. use "/Users/gwf25/Dropbox/research/religion/final code/religion_all.dta"
{txt}
{com}. 
. //  Begin definition of variables
. 
. ***Drop subjects who thought the experiment was about religion
. gen id = _n
{txt}
{com}. drop if id == 98 | id == 176 | id == 194 | id == 383
{txt}(4 observations deleted)

{com}. 
. ***Drop subjects who incorrectly completed the priming task. This includes subjects who leave more than half the responses blank. The following subjects
. ***all left at least questions #2-#7 blank in the sentence unscrambling task. 
. drop if id==7 | id==719 | id==740 | id==762 | id==940
{txt}(5 observations deleted)

{com}. 
. ***An error led to some subjects seeing both the control and religion salient sentence unscrambling tasks. Here, we drop those subjects.
. drop if prime_diff == 1
{txt}(2 observations deleted)

{com}. 
. ***"skipped" is a dummy variable for whether subjects skip the question that asks their religion. If they skip this question, we drop them from the sample 
. ***and if not, we assign a dummy variable to indicate the treatment group (religion salient or control) that subject belongs to.
. gen skipped=0
{txt}
{com}. replace skipped=1 if  s10q15==""
{txt}(21 real changes made)

{com}. gen treatR=.
{txt}(1033 missing values generated)

{com}. replace treatR=religion if skipped==0
{txt}(1012 real changes made)

{com}. drop if skipped==1
{txt}(21 observations deleted)

{com}. 
. ***Define religion
. gen relig=.
{txt}(1012 missing values generated)

{com}. 
. ***Note: 1 = protestant or other christian, 2 = catholic, 3 = jewish, 4 = agnostic/atheist
. replace relig=1 if (s10q15=="Christian - Other (please specify below)" | s10q15=="Christian - Protestant (please specify denomination below)")
{txt}(264 real changes made)

{com}. replace relig=2 if s10q15=="Christian - Catholic"
{txt}(199 real changes made)

{com}. replace relig=3 if s10q15=="Jewish (Orthodox/Reformed/etc.)" | s10q15=="Jewish (Orthodox/Reform/etc.)"
{txt}(95 real changes made)

{com}. replace relig=4 if (s10q15=="Agnostic" | s10q15=="Atheist")
{txt}(269 real changes made)

{com}. 
. ***Drop Mormon/Othodox Christians from the sample
. drop if s10q15sp == "Greek Orthodox"
{txt}(2 observations deleted)

{com}. drop if s10q15sp == "Russian Othrodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "greek orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Orthodox Christian"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthdox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "christian orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthodox Christian"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Russian orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Church of Jesus Christ of Latter Day Saints"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthodox"
{txt}(0 observations deleted)

{com}. 
. // End of variables
. 
. ***Drop those subjects who don't take part in the risk preference section
. drop if s3q1 == .
{txt}(596 observations deleted)

{com}. 
. ***Generate upper limit for risk with small amounts
. gen risk1=.
{txt}(406 missing values generated)

{com}. replace risk1=(1.6*0.5-1) if s3q1==1
{txt}(37 real changes made)

{com}. gen risk2=.
{txt}(406 missing values generated)

{com}. replace risk2=(2*0.5-1) if s3q2==1
{txt}(111 real changes made)

{com}. gen risk3=.
{txt}(406 missing values generated)

{com}. replace risk3=(2.4*0.5-1) if s3q3==1
{txt}(244 real changes made)

{com}. gen risk4=.
{txt}(406 missing values generated)

{com}. replace risk4=(2.8*0.5-1) if s3q4==1
{txt}(342 real changes made)

{com}. gen risk5=.
{txt}(406 missing values generated)

{com}. replace risk5=(3.2*0.5-1) if s3q5==1
{txt}(377 real changes made)

{com}. gen risk6=.
{txt}(406 missing values generated)

{com}. replace risk6=(3.6*0.5-1) if s3q6==1
{txt}(390 real changes made)

{com}. 
. ***Choose the upper limit for the first time a subject chooses the risky asset with small amounts.
. gen reservationrisk1= min(risk1,risk2,risk3,risk4,risk5,risk6)
{txt}(11 missing values generated)

{com}. 
. ***Generate upper limit for risk with large amounts
. gen risk7=.
{txt}(406 missing values generated)

{com}. replace risk7=(160*0.5-100)/100 if s4q1==1
{txt}(19 real changes made)

{com}. gen risk8=.
{txt}(406 missing values generated)

{com}. replace risk8=(200*0.5-100)/100 if s4q2==1
{txt}(51 real changes made)

{com}. gen risk9=.
{txt}(406 missing values generated)

{com}. replace risk9=(240*0.5-100)/100 if s4q3==1
{txt}(137 real changes made)

{com}. gen risk10=.
{txt}(406 missing values generated)

{com}. replace risk10=(280*0.5-100)/100 if s4q4==1
{txt}(224 real changes made)

{com}. gen risk11=.
{txt}(406 missing values generated)

{com}. replace risk11=(320*0.5-100)/100 if s4q5==1
{txt}(283 real changes made)

{com}. gen risk12=.
{txt}(406 missing values generated)

{com}. replace risk12=(360*0.5-100)/100 if s4q6==1
{txt}(298 real changes made)

{com}. 
. ***Choose the upper limit for the first time a subject chooses the risky asset with large amounts.
. gen reservationrisk2= min(risk7,risk8,risk9,risk10,risk11,risk12)
{txt}(102 missing values generated)

{com}. 
. ***Create two entries per subject. One is for small amounts and the other is for large amounts. riskchoice indicates whether it is a small or large stake gamble. 
. reshape long reservationrisk, i(id) j(riskchoice)
{txt}(note: j = 1 2)

Data{col 36}wide{col 43}->{col 48}long
{hline 77}
Number of obs.                 {res}     406   {txt}->{res}     812
{txt}Number of variables            {res}     218   {txt}->{res}     218
{txt}j variable (2 values)                     ->   {res}riskchoice
{txt}xij variables:
      {res}reservationrisk1 reservationrisk2   {txt}->   {res}reservationrisk
{txt}{hline 77}

{com}. 
. ***largestake is a dummy where a 1 indicates risk choices with large amounts and a 0 indicates risk choices with small amounts.
. gen largestake=0
{txt}
{com}. replace largestake= 1 if riskchoice==2 
{txt}(406 real changes made)

{com}. 
. ***Recall reservationrisk indicates the upper limit. Rename this variable risku and create another variable, riskl, which will indicate the lower limit.
. rename reservationrisk risk
{txt}
{com}. gen riskl=.
{txt}(812 missing values generated)

{com}. gen risku=risk
{txt}(113 missing values generated)

{com}. 
. ***Fill in values for the lower limit.
. ***Note that even if someone always chose the safe option, they are assigned a missing value for the upper limit and the highest possible value we ask about for the lower limit. So they are properly taken care of.
. replace riskl=. if risk < -.2
{txt}(0 real changes made)

{com}. replace riskl=(1.6*0.5-1) if risk == 0
{txt}(108 real changes made)

{com}. replace riskl=(2*0.5-1) if risk > .1 & risk < .3
{txt}(225 real changes made)

{com}. replace riskl=(2.4*0.5-1) if risk > .3 & risk < .5
{txt}(187 real changes made)

{com}. replace riskl=(2.8*0.5-1) if risk > .5 & risk < .7
{txt}(97 real changes made)

{com}. replace riskl=(3.2*0.5-1) if risk > .7 & risk < .9
{txt}(26 real changes made)

{com}. replace riskl=(3.6*0.5-1) if risk == . & s4q1 ~= .
{txt}(113 real changes made)

{com}. 
. gen male = .
{txt}(812 missing values generated)

{com}. replace male = 0 if s10q8 == "Female"
{txt}(432 real changes made)

{com}. replace male = 1 if s10q8 == "Male"
{txt}(378 real changes made)

{com}. intreg riskl risku treatR largestake male if relig==2, cluster(id)

{txt}Fitting constant-only model:
{res}
{txt}Iteration 0:{space 3}log pseudolikelihood = {res: -292.9865}  
Iteration 1:{space 3}log pseudolikelihood = {res:-287.02948}  
Iteration 2:{space 3}log pseudolikelihood = {res:-286.93328}  
Iteration 3:{space 3}log pseudolikelihood = {res:-286.93325}  
Iteration 4:{space 3}log pseudolikelihood = {res:-286.93325}  
{res}
{txt}Fitting full model:
{res}
{txt}Iteration 0:{space 3}log pseudolikelihood = {res:-276.25903}  
Iteration 1:{space 3}log pseudolikelihood = {res:-270.41756}  
Iteration 2:{space 3}log pseudolikelihood = {res:-270.34896}  
Iteration 3:{space 3}log pseudolikelihood = {res:-270.34894}  
{res}
{txt}Interval regression{col 51}Number of obs{col 67}= {res}       152
{txt}{col 51}Wald chi2({res}3{txt}){col 67}= {res}     38.70
{txt}Log pseudolikelihood = {res}-270.34894{txt}{col 51}Prob > chi2{col 67}= {res}    0.0000

{txt}{ralign 78:(Std. Err. adjusted for {res:76} clusters in id)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      z{col 46}   P>|z|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}treatR {c |}{col 14}{res}{space 2}-.1487959{col 26}{space 2} .0680481{col 37}{space 1}   -2.19{col 46}{space 3}0.029{col 54}{space 4}-.2821678{col 67}{space 3}-.0154239
{txt}{space 2}largestake {c |}{col 14}{res}{space 2} .2969031{col 26}{space 2} .0513677{col 37}{space 1}    5.78{col 46}{space 3}0.000{col 54}{space 4} .1962242{col 67}{space 3}  .397582
{txt}{space 8}male {c |}{col 14}{res}{space 2}-.1682265{col 26}{space 2} .0694623{col 37}{space 1}   -2.42{col 46}{space 3}0.015{col 54}{space 4}-.3043701{col 67}{space 3}-.0320829
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .2971063{col 26}{space 2} .0590348{col 37}{space 1}    5.03{col 46}{space 3}0.000{col 54}{space 4} .1814003{col 67}{space 3} .4128124
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}    /lnsigma{col 14}{c |}{res}{space 2}-1.055371{col 26}{space 2} .0813513{col 37}{space 1}  -12.97{col 46}{space 3}0.000{col 54}{space 4}-1.214817{col 67}{space 3}-.8959254
{txt}{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}       sigma{col 14}{c |}{res}{space 2} .3480632{col 26}{space 2} .0283154{col 54}{space 4} .2967644{col 67}{space 3} .4082296
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}

  Observation summary:{col 24}{res}        9{col 34}{txt} left-censored observations
{col 24}{res}        0{col 34}{txt}    uncensored observations
{col 24}{res}       25{col 34}{txt}right-censored observations
{col 24}{res}      118{col 34}{txt}      interval observations

{com}. 
. *Catholic risk simulation exercise
. set seed 1
{txt}
{com}. clear all
{txt}
{com}. set more off
{txt}
{com}. save results1a, replace emptyok
{txt}(note: dataset contains 0 observations)
file results1a.dta saved

{com}. forvalues i = 1/1000 {c -(}
{txt}  2{com}. 
. quietly{c -(}
{txt}  3{com}. 
. clear all
{txt}  4{com}. set mem 30m
{txt}  5{com}. 
. use "/Users/gwf25/Dropbox/research/religion/final code/religion_all.dta"
{txt}  6{com}. 
. //  Begin definition of variables
. 
. ***Drop subjects who thought the experiment was about religion
. gen id = _n
{txt}  7{com}. drop if id == 98 | id == 176 | id == 194 | id == 383
{txt}  8{com}. 
. ***Drop subjects who incorrectly completed the priming task. This includes subjects who leave more than half the responses blank. The following subjects
. ***all left at least questions #2-#7 blank in the sentence unscrambling task. 
. drop if id==7 | id==719 | id==740 | id==762 | id==940
{txt}  9{com}. 
. ***An error led to some subjects seeing both the control and religion salient sentence unscrambling tasks. Here, we drop those subjects.
. drop if prime_diff == 1
{txt} 10{com}. 
. ***"skipped" is a dummy variable for whether subjects skip the question that asks their religion. If they skip this question, we drop them from the sample 
. ***and if not, we assign a dummy variable to indicate the treatment group (religion salient or control) that subject belongs to.
. gen skipped=0
{txt} 11{com}. replace skipped=1 if  s10q15==""
{txt} 12{com}. gen treatR=.
{txt} 13{com}. replace treatR=religion if skipped==0
{txt} 14{com}. drop if skipped==1
{txt} 15{com}. 
. ***Define religion
. gen relig=.
{txt} 16{com}. 
. ***Note: 1 = protestant or other christian, 2 = catholic, 3 = jewish, 4 = agnostic/atheist
. replace relig=1 if (s10q15=="Christian - Other (please specify below)" | s10q15=="Christian - Protestant (please specify denomination below)")
{txt} 17{com}. replace relig=2 if s10q15=="Christian - Catholic"
{txt} 18{com}. replace relig=3 if s10q15=="Jewish (Orthodox/Reformed/etc.)" | s10q15=="Jewish (Orthodox/Reform/etc.)"
{txt} 19{com}. replace relig=4 if (s10q15=="Agnostic" | s10q15=="Atheist")
{txt} 20{com}. 
. ***Drop orthodox/mormon from christian-other category
. *drop if s10q15sp == "Greek Orthodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Greek Orthdox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Russian Othrodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "greek orthodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Orthodox Christian" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "christian orthodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Greek Orthodox Christian" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Russian orthodox" & s10q15=="Christian - Other (please specify below)"
. *drop if s10q15sp == "Church of Jesus Christ of Latter Day Saints" & s10q15=="Christian - Other (please specify below)"
. 
. // End of variables
. 
. ***Panel A
. replace id = _n
{txt} 21{com}. 
. 
. ***Drop those subjects who don't take part in the risk preference section
. drop if s3q1 == .
{txt} 22{com}. keep if relig == 2
{txt} 23{com}. 
. **Drop subjects who don't give gender
. gen male = .
{txt} 24{com}. replace male = 0 if s10q8 == "Female"
{txt} 25{com}. replace male = 1 if s10q8 == "Male"
{txt} 26{com}. drop if male == .
{txt} 27{com}. 
. ***Generate upper limit for risk with small amounts
. gen risk1=.
{txt} 28{com}. replace risk1=(1.6*0.5-1) if s3q1==1
{txt} 29{com}. gen risk2=.
{txt} 30{com}. replace risk2=(2*0.5-1) if s3q2==1
{txt} 31{com}. gen risk3=.
{txt} 32{com}. replace risk3=(2.4*0.5-1) if s3q3==1
{txt} 33{com}. gen risk4=.
{txt} 34{com}. replace risk4=(2.8*0.5-1) if s3q4==1
{txt} 35{com}. gen risk5=.
{txt} 36{com}. replace risk5=(3.2*0.5-1) if s3q5==1
{txt} 37{com}. gen risk6=.
{txt} 38{com}. replace risk6=(3.6*0.5-1) if s3q6==1
{txt} 39{com}. 
. ***Choose the upper limit for the first time a subject chooses the risky asset with small amounts.
. gen reservationrisk1= min(risk1,risk2,risk3,risk4,risk5,risk6)
{txt} 40{com}. 
. ***Generate upper limit for risk with large amounts
. gen risk7=.
{txt} 41{com}. replace risk7=(160*0.5-100)/100 if s4q1==1
{txt} 42{com}. gen risk8=.
{txt} 43{com}. replace risk8=(200*0.5-100)/100 if s4q2==1
{txt} 44{com}. gen risk9=.
{txt} 45{com}. replace risk9=(240*0.5-100)/100 if s4q3==1
{txt} 46{com}. gen risk10=.
{txt} 47{com}. replace risk10=(280*0.5-100)/100 if s4q4==1
{txt} 48{com}. gen risk11=.
{txt} 49{com}. replace risk11=(320*0.5-100)/100 if s4q5==1
{txt} 50{com}. gen risk12=.
{txt} 51{com}. replace risk12=(360*0.5-100)/100 if s4q6==1
{txt} 52{com}. 
. ***Choose the upper limit for the first time a subject chooses the risky asset with large amounts.
. gen reservationrisk2= min(risk7,risk8,risk9,risk10,risk11,risk12)
{txt} 53{com}. 
. replace id = _n
{txt} 54{com}. 
. preserve
{txt} 55{com}. 
. gen idR = .
{txt} 56{com}. keep if treatR == 1
{txt} 57{com}. replace idR = _n
{txt} 58{com}. save rev1bR, replace
{txt} 59{com}. 
. drop _all
{txt} 60{com}. set obs 38 //draw 38
{txt} 61{com}. generate obsnoR = floor(32*runiform() + 1) //from 32
{txt} 62{com}. 
. sort obsnoR
{txt} 63{com}. save obsnos_to_drawR, replace
{txt} 64{com}. 
. use rev1bR, clear
{txt} 65{com}. generate obsnoR = idR
{txt} 66{com}. merge 1:m obsnoR using obsnos_to_drawR, keep(match) nogen
{txt} 67{com}. save R, replace
{txt} 68{com}. 
. restore
{txt} 69{com}. 
. gen idC = .
{txt} 70{com}. keep if treatR == 0
{txt} 71{com}. replace idC = _n
{txt} 72{com}. save rev1bC, replace
{txt} 73{com}. 
. drop _all
{txt} 74{com}. set obs 38 //draw 38
{txt} 75{com}. generate obsnoC = floor(44*runiform() + 1) // from 44
{txt} 76{com}. 
. sort obsnoC
{txt} 77{com}. save obsnos_to_drawC, replace
{txt} 78{com}. 
. use rev1bC, clear
{txt} 79{com}. generate obsnoC = idC
{txt} 80{com}. merge 1:m obsnoC using obsnos_to_drawC, keep(match) nogen
{txt} 81{com}. save C, replace
{txt} 82{com}. 
. clear all
{txt} 83{com}. 
. use R
{txt} 84{com}. append using C
{txt} 85{com}. 
. replace id = _n
{txt} 86{com}. 
. ***Create two entries per subject. One is for small amounts and the other is for large amounts. riskchoice indicates whether it is a small or large stake gamble. 
. reshape long reservationrisk, i(id) j(riskchoice)
{txt} 87{com}. 
. ***largestake is a dummy where a 1 indicates risk choices with large amounts and a 0 indicates risk choices with small amounts.
. gen largestake=0
{txt} 88{com}. replace largestake= 1 if riskchoice==2 
{txt} 89{com}. 
. ***Recall reservationrisk indicates the upper limit. Rename this variable risku and create another variable, riskl, which will indicate the lower limit.
. rename reservationrisk risk
{txt} 90{com}. gen riskl=.
{txt} 91{com}. gen risku=risk
{txt} 92{com}. 
. ***Fill in values for the lower limit.
. ***Note that even if someone always chose the safe option, they are assigned a missing value for the upper limit and the highest possible value we ask about for the lower limit. So they are properly taken care of.
. replace riskl=. if risk < -.2
{txt} 93{com}. replace riskl=(1.6*0.5-1) if risk == 0
{txt} 94{com}. replace riskl=(2*0.5-1) if risk > .1 & risk < .3
{txt} 95{com}. replace riskl=(2.4*0.5-1) if risk > .3 & risk < .5
{txt} 96{com}. replace riskl=(2.8*0.5-1) if risk > .5 & risk < .7
{txt} 97{com}. replace riskl=(3.2*0.5-1) if risk > .7 & risk < .9
{txt} 98{com}. replace riskl=(3.6*0.5-1) if risk == . & s4q1 ~= .
{txt} 99{com}. 
. intreg riskl risku treatR largestake male, cluster(id)
{txt}100{com}. 
. 
. matrix V = e(V)
{txt}101{com}. matrix b = e(b)'
{txt}102{com}. matrix se = vecdiag(cholesky(diag(vecdiag(V))))'
{txt}103{com}. 
. svmat b
{txt}104{com}. svmat se
{txt}105{com}. gen z = b1/se1
{txt}106{com}. gen p = 2*(1-normal(abs(z)))
{txt}107{com}. 
. replace id = _n
{txt}108{com}. drop if id > 1
{txt}109{com}. keep p
{txt}110{com}. 
. append using results1a
{txt}111{com}. save results1a, replace
{txt}112{com}. {c )-}
{txt}113{com}. display `i'
{txt}114{com}. {c )-}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{txt}
{com}. 
. clear all
{txt}
{com}. use results1a
{txt}
{com}. count if p < .05 // result 588/1000
{res}  588
{txt}
{com}. 
. *Dictator Game
. *only when it is the very first task after the prime
. clear all
{txt}
{com}. set mem 30m
{txt}(30720k)

{com}. set more off
{txt}
{com}. 
. use "/Users/gwf25/Dropbox/research/religion/final code/religion_all.dta"
{txt}
{com}. 
. //  Begin definition of variables
. 
. ***Drop subjects who thought the experiment was about religion
. gen id = _n
{txt}
{com}. drop if id == 98 | id == 176 | id == 194 | id == 383
{txt}(4 observations deleted)

{com}. 
. ***Drop subjects who incorrectly completed the priming task. This includes subjects who leave more than half the responses blank. The following subjects
. ***all left at least questions #2-#7 blank in the sentence unscrambling task. 
. drop if id==7 | id==719 | id==740 | id==762 | id==940
{txt}(5 observations deleted)

{com}. 
. ***An error led to some subjects seeing both the control and religion salient sentence unscrambling tasks. Here, we drop those subjects.
. drop if prime_diff == 1
{txt}(2 observations deleted)

{com}. 
. ***"skipped" is a dummy variable for whether subjects skip the question that asks their religion. If they skip this question, we drop them from the sample 
. ***and if not, we assign a dummy variable to indicate the treatment group (religion salient or control) that subject belongs to.
. gen skipped=0
{txt}
{com}. replace skipped=1 if  s10q15==""
{txt}(21 real changes made)

{com}. gen treatR=.
{txt}(1033 missing values generated)

{com}. replace treatR=religion if skipped==0
{txt}(1012 real changes made)

{com}. drop if skipped==1
{txt}(21 observations deleted)

{com}. 
. ***Define religion
. gen relig=.
{txt}(1012 missing values generated)

{com}. 
. ***Note: 1 = protestant or other christian, 2 = catholic, 3 = jewish, 4 = agnostic/atheist
. replace relig=1 if (s10q15=="Christian - Other (please specify below)" | s10q15=="Christian - Protestant (please specify denomination below)")
{txt}(264 real changes made)

{com}. replace relig=2 if s10q15=="Christian - Catholic"
{txt}(199 real changes made)

{com}. replace relig=3 if s10q15=="Jewish (Orthodox/Reformed/etc.)" | s10q15=="Jewish (Orthodox/Reform/etc.)"
{txt}(95 real changes made)

{com}. replace relig=4 if (s10q15=="Agnostic" | s10q15=="Atheist")
{txt}(269 real changes made)

{com}. 
. ***Drop Mormon/Othodox Christians from the sample
. drop if s10q15sp == "Greek Orthodox"
{txt}(2 observations deleted)

{com}. drop if s10q15sp == "Russian Othrodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "greek orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Orthodox Christian"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthdox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "christian orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthodox Christian"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Russian orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Church of Jesus Christ of Latter Day Saints"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthodox"
{txt}(0 observations deleted)

{com}. 
. // End of variables
. 
. rename s5 giveaway
{txt}
{com}. keep if sessiontype == "DG"
{txt}(785 observations deleted)

{com}. reg giveaway treatR if relig == 1 | relig == 2 | relig == 3 | relig == 4, r

{txt}Linear regression                                      Number of obs ={res}     166
                                                       {txt}F(  1,   164) ={res}    0.11
                                                       {txt}Prob > F      = {res} 0.7407
                                                       {txt}R-squared     = {res} 0.0007
                                                       {txt}Root MSE      = {res} .27059

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}    giveaway{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}treatR {c |}{col 14}{res}{space 2}-.0138459{col 26}{space 2} .0417765{col 37}{space 1}   -0.33{col 46}{space 3}0.741{col 54}{space 4}-.0963351{col 67}{space 3} .0686432
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} .2037209{col 26}{space 2} .0314473{col 37}{space 1}    6.48{col 46}{space 3}0.000{col 54}{space 4} .1416272{col 67}{space 3} .2658146
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. 
. *Labor market tasks
. *anagrams untabulated regression
. clear all
{txt}
{com}. set mem 30m
{txt}(30720k)

{com}. set more off
{txt}
{com}. 
. use "/Users/gwf25/Dropbox/research/religion/final code/religion_all.dta"
{txt}
{com}. 
. //  Begin definition of variables
. 
. ***Drop subjects who thought the experiment was about religion
. gen id = _n
{txt}
{com}. drop if id == 98 | id == 176 | id == 194 | id == 383
{txt}(4 observations deleted)

{com}. 
. ***Drop subjects who incorrectly completed the priming task. This includes subjects who leave more than half the responses blank. The following subjects
. ***all left at least questions #2-#7 blank in the sentence unscrambling task. 
. drop if id==7 | id==719 | id==740 | id==762 | id==940
{txt}(5 observations deleted)

{com}. 
. ***An error led to some subjects seeing both the control and religion salient sentence unscrambling tasks. Here, we drop those subjects.
. drop if prime_diff == 1
{txt}(2 observations deleted)

{com}. 
. ***"skipped" is a dummy variable for whether subjects skip the question that asks their religion. If they skip this question, we drop them from the sample 
. ***and if not, we assign a dummy variable to indicate the treatment group (religion salient or control) that subject belongs to.
. gen skipped=0
{txt}
{com}. replace skipped=1 if  s10q15==""
{txt}(21 real changes made)

{com}. gen treatR=.
{txt}(1033 missing values generated)

{com}. replace treatR=religion if skipped==0
{txt}(1012 real changes made)

{com}. drop if skipped==1
{txt}(21 observations deleted)

{com}. 
. ***Define religion
. gen relig=.
{txt}(1012 missing values generated)

{com}. 
. ***Note: 1 = protestant or other christian, 2 = catholic, 3 = jewish, 4 = agnostic/atheist
. replace relig=1 if (s10q15=="Christian - Other (please specify below)" | s10q15=="Christian - Protestant (please specify denomination below)")
{txt}(264 real changes made)

{com}. replace relig=2 if s10q15=="Christian - Catholic"
{txt}(199 real changes made)

{com}. replace relig=3 if s10q15=="Jewish (Orthodox/Reformed/etc.)" | s10q15=="Jewish (Orthodox/Reform/etc.)"
{txt}(95 real changes made)

{com}. replace relig=4 if (s10q15=="Agnostic" | s10q15=="Atheist")
{txt}(269 real changes made)

{com}. 
. ***Drop Mormon/Othodox Christians from the sample
. drop if s10q15sp == "Greek Orthodox"
{txt}(2 observations deleted)

{com}. drop if s10q15sp == "Russian Othrodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "greek orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Orthodox Christian"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthdox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "christian orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthodox Christian"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Russian orthodox"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Church of Jesus Christ of Latter Day Saints"
{txt}(1 observation deleted)

{com}. drop if s10q15sp == "Greek Orthodox"
{txt}(0 observations deleted)

{com}. 
. // End of variables
. 
. reg numcorrect treatR if relig == 1, r

{txt}Linear regression                                      Number of obs ={res}      77
                                                       {txt}F(  1,    75) ={res}    0.46
                                                       {txt}Prob > F      = {res} 0.4987
                                                       {txt}R-squared     = {res} 0.0061
                                                       {txt}Root MSE      = {res} 9.9296

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  numcorrect{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}treatR {c |}{col 14}{res}{space 2}-1.539136{col 26}{space 2} 2.264093{col 37}{space 1}   -0.68{col 46}{space 3}0.499{col 54}{space 4} -6.04944{col 67}{space 3} 2.971168
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 21.51282{col 26}{space 2} 1.570002{col 37}{space 1}   13.70{col 46}{space 3}0.000{col 54}{space 4} 18.38522{col 67}{space 3} 24.64043
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. reg numcorrect treatR if relig == 2, r

{txt}Linear regression                                      Number of obs ={res}      60
                                                       {txt}F(  1,    58) ={res}    0.18
                                                       {txt}Prob > F      = {res} 0.6764
                                                       {txt}R-squared     = {res} 0.0029
                                                       {txt}Root MSE      = {res} 15.685

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  numcorrect{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}treatR {c |}{col 14}{res}{space 2} 1.683258{col 26}{space 2} 4.012763{col 37}{space 1}    0.42{col 46}{space 3}0.676{col 54}{space 4}-6.349159{col 67}{space 3} 9.715675
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 23.97059{col 26}{space 2} 2.841564{col 37}{space 1}    8.44{col 46}{space 3}0.000{col 54}{space 4} 18.28258{col 67}{space 3}  29.6586
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. reg numcorrect treatR if relig == 3, r

{txt}Linear regression                                      Number of obs ={res}      33
                                                       {txt}F(  1,    31) ={res}    0.99
                                                       {txt}Prob > F      = {res} 0.3281
                                                       {txt}R-squared     = {res} 0.0305
                                                       {txt}Root MSE      = {res} 16.533

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  numcorrect{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}treatR {c |}{col 14}{res}{space 2} 5.691176{col 26}{space 2}  5.72793{col 37}{space 1}    0.99{col 46}{space 3}0.328{col 54}{space 4}-5.991013{col 67}{space 3} 17.37337
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 26.05882{col 26}{space 2} 4.339729{col 37}{space 1}    6.00{col 46}{space 3}0.000{col 54}{space 4} 17.20789{col 67}{space 3} 34.90976
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. reg numcorrect treatR if relig == 4, r

{txt}Linear regression                                      Number of obs ={res}      93
                                                       {txt}F(  1,    91) ={res}    0.93
                                                       {txt}Prob > F      = {res} 0.3365
                                                       {txt}R-squared     = {res} 0.0098
                                                       {txt}Root MSE      = {res} 11.832

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}  numcorrect{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 6}treatR {c |}{col 14}{res}{space 2} 2.334419{col 26}{space 2}  2.41609{col 37}{space 1}    0.97{col 46}{space 3}0.337{col 54}{space 4}-2.464847{col 67}{space 3} 7.133684
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 24.32558{col 26}{space 2} 1.555473{col 37}{space 1}   15.64{col 46}{space 3}0.000{col 54}{space 4} 21.23583{col 67}{space 3} 27.41534
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}. 
. 
. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}/Users/gwf25/Desktop/claims_VI.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res} 7 Dec 2015, 10:03:16
{txt}{.-}
{smcl}
{txt}{sf}{ul off}